/*
 ============================================================================
 文件名    : Line.cpp
 描述     : CLine类的实现.
 ============================================================================
 */

// 引用
#include "ScoreCounter.h"

// ============================ 成员函数 ===============================

// ---------------------------------------------------------
// CScoreCounter::CScoreCounter
// 构造函数.
// ---------------------------------------------------------
//
CScoreCounter::CScoreCounter():iScore(0)
    {
    }

// ---------------------------------------------------------
// CScoreCounter::ConstructL
// 两段构造函数.
// ---------------------------------------------------------
//
void CScoreCounter::ConstructL()
    {
    }

// ---------------------------------------------------------
// CScoreCounter::NewL
// 构造函数.
// ---------------------------------------------------------
//
CScoreCounter* CScoreCounter::NewL()
    {
    CScoreCounter* self = new (ELeave)CScoreCounter;
    CleanupStack::PushL( self );
    self->ConstructL();
    CleanupStack::Pop();
    return self;
    }

// ---------------------------------------------------------
// CScoreCounter::~CScoreCounter
// 析构函数.
// ---------------------------------------------------------
//
CScoreCounter::~CScoreCounter()
    {
    
    }

// ---------------------------------------------------------
// CScoreCounter::GetScore
// 返回分数.
// ---------------------------------------------------------
//
TInt CScoreCounter::GetScore()
    {
    return iScore;
    }

// ---------------------------------------------------------
// CScoreCounter::SetScore
// 设置分数.
// ---------------------------------------------------------
//
void CScoreCounter::SetScore( TInt aScore )
    {
    iScore = aScore;
    }

// ---------------------------------------------------------
// CScoreCounter::IncScore
// 加分.
// ---------------------------------------------------------
//
TInt CScoreCounter::IncScore( TInt aDelta )
    {
    iScore += aDelta;
    return iScore;
    }

// ---------------------------------------------------------
// CScoreCounter::GameChanged
// 接收到游戏运行事件.
// ---------------------------------------------------------
//
void CScoreCounter::GameChanged( CEngine* /*aGame*/ )
    {
    
    }

// ---------------------------------------------------------
// CScoreCounter::GamePaused
// 接收到游戏暂停事件.
// ---------------------------------------------------------
//
void CScoreCounter::GamePaused( CEngine* /*aGame*/ )
    {
    
    }

// ---------------------------------------------------------
// CScoreCounter::GameOver
// 接收到游戏结束事件.
// ---------------------------------------------------------
//
void CScoreCounter::GameOver( CEngine* /*aGame*/ )
    {
    
    }

// ---------------------------------------------------------
// CScoreCounter::BallHitsLine
// 接收到碰撞事件.
// ---------------------------------------------------------
//
void CScoreCounter::BallHitsLine( CEngine* /*aGame*/ )
    {
    IncScore();
    }

// 文件结束
